/**
 * 
 */
package model;

/**
 * @author vhapugmarkhc
 *
 */
public class Visit {

	private String my_visit_id;
	private String my_origin;
	private String my_destination;
	private int my_mileage;
	private int my_time;
	
	/**
	 * 
	 */
	public Visit(final String the_visit_id, final String the_origin, 
			final String the_destination) {
		my_visit_id = the_visit_id;
		my_origin = the_origin;
		my_destination = the_destination;
	}
	/**
	 * 
	 */
	public Visit(final String the_visit_id, final String the_origin, 
			final String the_destination, final int the_mileage, final int the_time) {
		my_visit_id = the_visit_id;
		my_origin = the_origin;
		my_destination = the_destination;
		my_mileage = the_mileage;
		my_time = the_time;
	}
	public String getVisitID(){
		return my_visit_id;
	}
	
	public String getOrigin(){
		return my_origin;
	}
	
	public String getDestination(){
		return my_destination;
	}
	
	public int getMileage(){
		return my_mileage;
	}
	
	public int getTime(){
		return my_time;
	}
	public void setMileage(final int the_mileage){
		my_mileage = the_mileage;
	}	
	public void setTime(final int the_time){
		my_time = the_time;
	}	
	
	@Override public String toString(){
	    StringBuilder result = new StringBuilder();
	    String NEW_LINE = System.getProperty("line.separator");

	    result.append(this.getClass().getName() + " Object {" + NEW_LINE);
	    result.append(" VisitID: " + my_visit_id + NEW_LINE);
	    result.append(" Origin: " + my_origin + NEW_LINE);
	    result.append(" Destination: " + my_destination + NEW_LINE );
	    result.append(" Mileage: " + my_mileage + NEW_LINE);
	    //Note that Collections and Maps also override toString
	    result.append(" Time: " + my_time + NEW_LINE);
	    result.append("}");
	    return result.toString();
	}
}
